import taichi as ti
import numpy as np

def numpy_to_taichi_field(x):
    x = x.astype(np.float32)
    tempField = ti.field(float, shape=x.shape)
    tempField.from_numpy(x)
    return tempField